package com.lbd.system.bean;

import com.lbd.bankcard.bean.BankCard;
import com.lbd.base.bean.AbstractEntity;
import lombok.*;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;

@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@DynamicUpdate
@Entity
public class BindCard extends AbstractEntity {
    //银行卡号
    private String bankNo;
    //开户行
    private String bankBranch;
    //所属银行
    @NotNull
    @ManyToOne
    @JoinColumn(name = "bank_card_id")
    private BankCard bankCard;
    //用户ID
    private String userId;
}
